//\file: Vector3.h
#ifndef __ATOMTRACE_TRAX_VECTOR3_H_
#define __ATOMTRACE_TRAX_VECTOR3_H_
namespace AtomTrace{
class Vector3
{
	private:
	float _x, _y, _z;
	public:
	Vector3();
	Vector3(float ix, float iy, float iz);
	Vector3(const Vector3 & other);
    Vector3(int address);

    void Set(float ix, float iy, float iz);

	const float & operator[](int index) const;
	float & operator[](int index);	

	const Vector3 & operator=(const Vector3 & rhs);

	const Vector3 operator+(const Vector3 & rhs) const;
	const Vector3 operator-(const Vector3 & rhs) const;
	
	const Vector3 operator*(float scale) const;
	const Vector3 operator/(float factor) const;

	const float Dot(const Vector3 & rhs) const;
	const Vector3 Cross(const Vector3 &rhs) const;

	const Vector3 GetNormalize() const;
	void Normalize();

	const float Length() const;
	const float LengthSquare() const;

    // **** Inline functions ****
    inline const Vector3 & LoadFromGM(int address);

/*/---------WARNING: These static constant variables is not safe in TRaX ----------->
	static const Vector3 ZERO;
	static const Vector3 UNIT_X;
	static const Vector3 UNIT_Y;
	static const Vector3 UNIT_Z;
//---------------------------------------------------------<*/

};

// ****** Inline functions ******
inline const Vector3 LoadVectorFromGM(int address);

} // namespace AtomTrace
#include "Vector3.inl"

#endif //__ATOMTRACE_TRAX_VECTOR3_H_
